package com.lagou.zkweb;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class Select {

    public static void selectData() throws Exception {
        Connection connection = DruidManager.getConnection();
        if (connection == null) {
            return;
        }
        System.out.println(connection);
        PreparedStatement preparedStatement = connection.prepareStatement("select * from tb_resume where id = 1");
        ResultSet resultSet = preparedStatement.executeQuery();
        if (resultSet.next()) {
            System.out.println(resultSet.getString("address"));
            System.out.println(resultSet.getString("name"));
        }
    }
}
